<?php
namespace app\wxmp\controller;
class Index extends Base{

    //微信名片详情页
    function index(){
        if(is_post()){
            $d = $this->post;
            $rule = [
                'share_url'=>'require',
            ];
            $msg = [
            ];
            check($rule,$msg,$d);
            $app = m('weixin','c')->getApp(c("api.wx_gzh_config")['myb']);
            $app->jssdk->setUrl(urldecode($d['share_url']));
            $rs = $app->jssdk->buildConfig(array('openLocation','onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'), false);
            suc($rs);
        }
        $info = $this->db->find('wxmp',$this->get('id'));
        $this->fetch(['info'=>$info], '', false);
    }
}
?>
